package com.wwg.market.ui.member.client.common;

import com.google.gwt.i18n.client.DateTimeFormat;

import java.util.Date;

/**
 * Created by IntelliJ IDEA.
 *
 * @author gaoyang
 * @version $Id: $
 * @date 12-2-27 上午12:27
 */
public class MemberUtils {
    public static String CheckNull(Object o) {
        return o == null ? "" : o.toString();
    }

    public static String getLockedString(Boolean o) {
        if (o == null) return "";
        else return o ? "<font color='red'>已锁定</font>" : "<font color='green'>未锁定</font>";
    }

    public static String getDateString(Date date) {
        if (date == null) return "";
        else return DateTimeFormat.getFormat("yyyy-MM-dd HH:mm:ss").format(date);
    }

}
